package common.item
{
	import com.common.utils.Reflection;
	
	import flash.display.MovieClip;
	import flash.events.MouseEvent;
	
	import lz.controls.events.ListEvent;

	/**
	 *物品使用面板item  
	 * @author lake
	 * 
	 */	
	public class GoodsUseItem extends GoodsItem
	{
		public function GoodsUseItem()
		{
			super();
		}
		/**
		 * 初始化
		 * @param view
		 * 
		 */		
		override public function initUI(view:Object=null):void
		{
			super.initUI();
			this.doubleClickEnabled = true;
			addEvtListener();
		}
		/**
		 * 单击
		 * @param e
		 * 
		 */		
		override protected function onClickHandler(e:MouseEvent):void
		{
			if(_data == null)
			{
				return;
			}
			this.dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK,true,false,-1,-1,-1,_data));
		}
		/**
		 *双击使用 
		 * @param e
		 * 
		 */		
		override protected function onDoubleClickHandler(e :MouseEvent):void
		{
			this.dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK,true,false,-1,-1,-1,_data));
		}
	}
}